<template>
  <a-drawer
    :title="title"
    placement="right"
    :closable="true"
    width="100%"
    :visible="visible"
    @close="onClose"
  >
    <a-tabs type="card" @change="callback">
      <a-tab-pane key="1" tab="基本信息">
        <circuit-basic-info ref="circuitBasicInfo" :record="model"></circuit-basic-info>
      </a-tab-pane>
      <a-tab-pane key="2" tab="巡查照片">
        <circuit-image ref="circuitImage" :record="model"></circuit-image>
      </a-tab-pane>
    </a-tabs>
  </a-drawer>
</template>

<script>

  import circuitBasicInfo from './tabs/circuit/circuitBasicInfo'
  import circuitImage from './tabs/circuit/circuitImage'

export default {
  name: "circuitDetailModel",
  components: {
    circuitBasicInfo,circuitImage,
  },
  data () {
    return {
      visible: false,
      title: "",
      model: {},
    }
  },
  methods: {
    //切换选项卡时调用
    callback(key) {
      //console.log(key);
    },
    showDrawer(record) {
      this.visible = true;
      this.model = record;
    },
    onClose() {
      this.visible = false;
    },
  }
}
</script>

<style scoped>

</style>
